<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        // 解构：按位取值，并赋值给相应的变量

        let [a, b, c] = [100, 200, 300];

        console.log(a)	// 100
        console.log(b)	// 200
        console.log(c)	// 300
        

        // 数组中的元素可以是任意类型的数据
        let [aa, bb, cc, dd] = [
            'AA', 
            [true, 20], 
            { name: 'zs' }, 
            function () { console.log('函数'); }
        ];
        
        console.log(aa);
        console.log(bb);
        console.log(cc);
        console.log(dd);
        
    </script>
</body>
</html>